A raster-to-vector (r2v) algorithm is a method of converting pixelized raster data into vector data where the vectors are the edges which follow along where pixels change color. Known raster-to-vector algorithms utilize gradient following algorithms. A list of vectors is built up by tracing the edges along which the change in color (gradient) is a constant. In such methods, the raster is searched in a random-access fashion such that a single vector is being built until it is closed by wrapping back onto itself. Most known raster-to-vector algorithms differ by how they detect the color gradient and the iteration pattern they use to search the raster or to build the active vector. However, many such algorithms traverse the image and trace out where the color changes. There are some additional variations when the raster itself is too big to fit in memory. These methods will load a tile of raster data in memory, build all the vectors for that tile then load a different tile and repeat, finally stitching together all the tiles in the end.
Such raster-to-vector algorithms require some form of random-access to the data. The two options are to load the entire image into memory so that arbitrary pixels can be inspected for adjacent color changes, or to split the image up into tiles, load each tile, do a random-access raster-to-vector processing on each tile, then stitch the tiles back together. The former approach is often used for smaller images; however, when the image is too large to fit into memory the tile approach must be utilized. However, such processing techniques scale up badly as the image grows and the number and size of the extracted vectors grows. As such, known raster-to-vector algorithms require multiple, random access of the source image data which for large images becomes unwieldy if they cannot fit into memory.